#include <stdlib.h>
#include <string.h>
#include <math.h>
+#include <linux/fb.h>
+
+/* Two minutes */
+#define BLANKING_TIMEOUT 120*1000
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
gboolean caps_lock : 1;
} Keyboard;
+static guint blanking_timer = 0;
+
static Keyboard * tty_keyboard_open(void);
static guint keyboard_get_state(Keyboard *k);
static guint multiclick_tag;
static GdkEvent *multiclick_event = NULL;
+#ifndef VESA_NO_BLANKING
+#define VESA_NO_BLANKING 0
+#define VESA_VSYNC_SUSPEND 1
+#define VESA_HSYNC_SUSPEND 2
+#define VESA_POWERDOWN 3
+#endif
+
+#if 0
+static gboolean
+input_activity_timeout(gpointer p)
+{
+ blanking_timer = 0;
+ ioctl(gdk_display->fd, FBIOBLANK, VESA_POWERDOWN);
+ return FALSE;
+}
+#endif
+
+/* This is all very broken :( */
+static void
+input_activity(void)
+{
+#if 0
+ if(blanking_timer)
+ g_source_remove(blanking_timer);
+ else
+ gdk_fb_redraw_all();
+
+ blanking_timer = g_timeout_add(BLANKING_TIMEOUT, input_activity_timeout, NULL);
+#endif
+}
+
static gboolean
click_event_timeout(gpointer x)
{
gdk_window_unref(mouse->prev_window);
mouse->prev_window = gdk_window_ref(win);
}
+
+ input_activity();
}
static gboolean
}
}
+ input_activity();
+
return TRUE;
}
retval = g_new0(GdkFBDisplay, 1);
retval->fd = fd;
+ ioctl(retval->fd, FBIOBLANK, 0);
n = ioctl(fd, FBIOGET_FSCREENINFO, &retval->sinfo);
n |= ioctl(fd, FBIOGET_VSCREENINFO, &retval->modeinfo);
g_assert(!n);